<%--
  Created by IntelliJ IDEA.
  User: zer
  Date: 2019/9/17
  Time: 18:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=0.58,maximum-scale=1.0, user-scalable=no">
    <title>智慧云打印移动端</title>

    <link rel="stylesheet" href="css/ssi-uploader.css"/>
    <link rel="stylesheet" href="css/bootstrap-responsive.min.css"/>
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <link rel="stylesheet" href="css/style.css"/>

    <script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <script src="js/ssi-uploader.js"></script>

    <script type="text/javascript" src="js/popper.js"></script>
    <script type="text/javascript" src="js/bootbox.js"></script>
    <script type="text/javascript" src="js/bootbox.locales.js"></script>

    <style>
        input[type="checkbox"] {
            margin: 5px 0px 0px 37px;
        }
    </style>

</head>
<body>
<s:debug></s:debug>
<div class="container banxin2">
    <div class="row">
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="header">
            <img src="img/logo2.png"/>
        </div>
    </div>
    <div id="content">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <label>
                    <input type="file" multiple id="ssi-upload3"/>
                </label>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div id='insign'>
                <label id="tip" class="text-explain">欢迎使用智慧云打印</label>
                <br/>
                <label class="text-explain">
                    请选择需要打印的本地文件。
                </label>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">

    $('#ssi-upload3').ssi_uploader({
        url: '${pageContext.request.contextPath}/FileUpLoadAction_upLoad',
        locale: 'ch',
        dropZone: false,
        preview: true,
        maxNumberOfFiles: 5,
        maxFileSize: 2048,
        allowed: ['avi', 'css', 'csv', 'doc', 'docx',
            'eml', 'eps', 'html', 'htm', 'jpg',
            'mov', 'mp3', 'pdf', 'png', 'ppt', '' +
            'rar', 'raw', 'ttf', 'txt', 'wav',
            'xls', 'zip'],
        onUpload: function () {
            bootbox.confirm({
                size: "large",
                message: "是否继续上传?",
                locale: "zh_CN",
                buttons: {
                    confirm: {
                        label: '结束上传',//true
                        className: 'btn-primary'
                    },
                    cancel: {
                        label: '继续上传',//false
                        className: 'btn-secondary'
                    }
                },
                callback: function (result) {
                    if (result) {
                        bootbox.alert({
                            size: "small",
                            title: "即将离开上传页面",
                            message: "提取码:${extract.extract_code}",
                            closeButton: false,
                            locale: "zh_CN",
                            callback: function (result) {
                                window.location.href = "${pageContext.request.contextPath}/";
                            }
                        });

                    }
                }
            });
        }

    });

</script>
</html>
